<template>
    <div>
              <p>state的值:{{$store.state.TestArr}}</p>
              <p>getterste的值:{{TestArr_getters}}</p>
            <p>TestObj的值：{{TestObj}}</p>
            <button @click="fun1">改变</button>
    </div>
</template>

<script>
  import {mapGetters,mapState} from 'vuex'
    export default {
      name: '',
      computed:{
        ...mapState(['TestObj']),
        ...mapGetters(['TestArr_getters']),
      },
      methods:{
        fun1(){
              this.$store.dispatch('changeTestArr_action')
        }
      }
    };
</script>


